<template>
  <div>后台</div>
  <!-- <el-button @click="getlogout" type="primary"> 退出登录 </el-button> -->
</template>
 
<script setup>
import { ref } from "vue";
import { logout } from "@/api/admin/manager";
import { showMessage, showModel } from "@/composables/utils";
import { removeToken } from "@/composables/auth";
import { useRouter } from "vue-router";
import { useStore } from "vuex";

const router = useRouter();
const store = useStore();

const getlogout = () => {
  showModel("是否确认要退出登录？").then(() => {
    logout().finally(() => {
      store.dispatch("logout");

      // 跳转登录页
      router.push("/login");
      showMessage("退出登录成功！");
    });
  });
};
</script>

<style>
</style>